package com.app.dao;

import com.app.entity.Customer;
import com.app.entity.Permission;
import com.app.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by xinjian.hu on 18-3-7.
 */
public interface LoginDao {
    /**
     * 获取客户信息
     * @param username
     * @return
     */
    public Customer getUser(@Param("username")String username);

    /**
     *
     * @param roleId
     * @return
     */
    public List<Permission> getPermissions(@Param("roleId")Integer roleId);

    /**
     * 根据用户id获取角色
     *
     * @param userId
     * @return
     */
    public Role getRole(@Param("userId")Integer userId);


}
